﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TaiLieu;
public partial class TaiLieu_downloadL : System.Web.UI.UserControl
{
    // public string _del = "&" + QueryString._Del + "=" + QueryString._Del;
    public string _Url = "";
    //int parent = "";
    // string _kind = "";
    public string _link = "";
    // int _id = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadData(ConvertType.ToInt(QueryHelper.Get_Value_TheEndOfQueryString(Request)));
        grid.RowCancelingEdit += delegate { Response.Redirect(Request.Url.ToString()); };

    }
    protected void LoadData(int pare)
    {
        DataBind(TaiLieu_downloadDB.GetChildren(true, pare, QueryHelper.Get_Domain_1_maHoa(Request)));
    }
    void DataBind(object al)
    {
        if (al != null)
        {
            grid.DataKeyNames = new string[] { ColumTaiLieu_download.Id };
            grid.DataSource = al;
            grid.DataBind();
        }
    }


    protected void grid_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        grid.PageIndex = e.NewPageIndex;
    }


}
